package com.shura.ssm.service.UserService;

import com.shura.ssm.common.entity.User;

import java.util.List;

/**
 * UserService
 * Created by shura
 * Date：2017/9/3
 * Time：16:40
 */
public interface UserService {

    /**
     * 根据id查询用户实体
     *
     * @param userId
     * @return
     * @throws Exception
     */
    public User queryById(int userId)throws Exception;

    /**
     * 新增用户
     *
     * @param user
     * @throws Exception
     */
    public void newUser(User user) throws Exception;

    /**
     * 修改用户
     *
     * @param user
     * @throws Exception
     */
    public void update(User user) throws Exception;

    /**
     * 删除用户
     *
     * @param id
     * @throws Exception
     */
    public void deleteById(int id) throws Exception;

    /**
     * 查询所有用户
     *
     * @return
     * @throws Exception
     */
    public List<User> listAll() throws Exception;

    /**
     * 判断登录状态
     *
     * @param user
     * @return
     * @throws Exception
     */
    public boolean checkLogin(User user) throws Exception;
}
